﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.CompositeUI.EventBroker;
using System.Windows.Forms;

namespace EventPublicationScope
{
    public class Subscriber
    {
        private string _message = "Not Set";
        public string Message 
        {
            set { _message = value; }
            get { return _message; }
        }

        [EventSubscription("MyEvent")]
        public void MyEvent(object sender, EventArgs e)
        {
            MessageBox.Show(_message);
        }
    }
}
